<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
 <head>
    
    <title>微信编辑器 -leipi.org</title>
        <meta name="keyword" content="">
        <meta name="description" content="">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="author" content="leipi.org">
    <link href="/Public/css/bootstrap/css/bootstrap.css?<?php echo ($_cjv); ?>" rel="stylesheet" type="text/css" />
    <!--[if lte IE 6]>
    <link rel="stylesheet" type="text/css" href="/Public/css/bootstrap/css/bootstrap-ie6.css?<?php echo ($_cjv); ?>">
    <![endif]-->
    <!--[if lte IE 7]>
    <link rel="stylesheet" type="text/css" href="/Public/css/bootstrap/css/ie.css?<?php echo ($_cjv); ?>">
    <![endif]-->
    <link href="/Public/css/site.css?<?php echo ($_cjv); ?>" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        var _root='<?php echo ($_site_url); echo U('/');?>',_controller = '<?php echo ($_controller); ?>';
    </script>
    

<link href="/Public/css/wwei_editor.css?2023" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="/Public/wxeditor/css/jquery.jgrowl.css" />

<script type="text/javascript" src="/Public/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/Public/css/bootstrap/js/bootstrap.min.js"></script>



 </head>
<body>

<!-- fixed navbar -->
<div class="navbar navbar-inverse navbar-fixed-top">
  <div class="navbar-inner">
    <div class="container">
      <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="brand" href="http://www.leipi.org" target="_blank">雷劈网</a>
      <div class="nav-collapse collapse">
        <ul class="nav">
            <li><a href="http://flowdesign.leipi.org">流程设计器</a></li>
            <li><a href="http://formdesign.leipi.org">表单设计器</a></li>
            <li><a href="http://formbuild.leipi.org">拖拽式表单设计器</a></li>
            <li><a href="http://qrcode.leipi.org">自动生成二维码</a></li>
			<li <?php if($_controller == 'index'): ?>class="active"<?php endif; ?>><a href="/">微信编辑器</a></li>
            <li <?php if($_controller == 'downloads'): ?>class="active"<?php endif; ?>><a href="<?php echo U('/downloads');?>">下载</a></li>
            <li><a href="http://bbs.leipi.org/" target="_blank">交流论坛</a></li>
        </ul>
      </div>
    </div>
  </div>
</div>


	


<!-- Docs page layout -->
<div class="bs-header" id="content">
  <div class="container">

    <h1><img src="http://formdesign.leipi.org/Public/js/ueditor/formdesign/images/leipi_formdesign.png" width="64"/>微信编辑器 <small> wxEditor V1.0.0</small></h1>
    <p>
        感谢大家使用，如有任何意见或建议，请务必告知，<a href="#bs-footer">免责声明</a>。
        <a class="btn btn-primary" href="<?php echo U('/downloads');?>"><i class="icon-white icon-arrow-down"></i> 马上下载 V1.0.0 <em style="color:#ddd">2015/05/17</em></a>
		<p>
        复制分享：<input type="text" value="大家都在用雷劈网开源微信编辑器，你去官网看看 http://wxeditor.leipi.org/" style="width:80%" onclick="this.select()"/>
        </p>
		交流Q群：<a target="_blank" href="http://shang.qq.com/wpa/qunwpa?idkey=7ab5280aad1fcf1528a8f070d06acfef1345549775d0d4ae26553ce201a92343"><img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="雷劈网WEB技术交流2" title="雷劈网WEB技术交流2"></a> 2群 390183835 &nbsp;&nbsp;1群 <del>143263697</del> [ 满 ]
    </p>
    
  </div>
</div>


    <div class="container">

<div class="row">



		<h4>正文模板样式定义</h4>
<div><hr/>
	色调：<input class="colorPicker form-control" style="width:70px;" id="custom-color" value="#866EBB" />
	&nbsp;&nbsp;<label class="checkbox inline"><input type="checkbox" id="replace-color-all" value="1">正文换色</label>
	<hr/>
</div>



	<div class="span5">


<ul class="nav nav-tabs" id="templateTab">
  <li class="active"><a href="#temp-title" data-type="title">标题</a></li>
  <li><a href="#temp-text" data-type="text">正文</a></li>
  <li><a href="#temp-img" data-type="img">图片</a></li>
  <li><a href="#temp-follow" data-type="follow">吸粉</a></li>
  <li><a href="#temp-scene" data-type="scene">场景</a></li>
  <li><a href="#temp-tpl" data-type="tpl">模板</a></li>
</ul>
 
<div class="tab-content template-content">
	<div id="template-loading" class="hide"><img src="/Public/images/loading.gif"> 加载中...</div>
	<div class="tab-pane active" id="temp-title"></div>
	<div class="tab-pane" id="temp-text"></div>
	<div class="tab-pane" id="temp-img"></div>
	<div class="tab-pane" id="temp-follow"></div>
	<div class="tab-pane" id="temp-scene"></div>
	<div class="tab-pane" id="temp-tpl"></div>
</div><!--tab-content-->

	
<div class="alert alert-info">
  微信编辑器，由 <a href="http://wxeditor.leipi.org/" target="_blank">雷劈网 - 开源社区</a> 提供
</div>
<!--div>
<script type="text/javascript">
    /*新微信编辑器底 380*120 创建于 2015-05-05*/
    var cpro_id = "u2084828";
</script>
<script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>
</div-->

	</div>

	<div class="span7" id="wxcontent">
		<fieldset>
			<div>
				<span class="pull-right">
					<a href="javascript:void(0);" id="copy-editor-html" class="btn btn-primary disabled">复制正文</a>
					<a href="javascript:void(0);" id="clear-editor" class="btn btn btn-danger disabled">清空</a>
				</span>
				<label>正文</label>
			</div>
			<div style="clear:both"></div>
			<div>
				<script id="wwei_editor" type="text/plain" style="width:540px;height:600px;"></script>
			</div>
		</fieldset>
	</div>
</div>
 
    </div> <!-- /container -->
    
 


 

    
 <div class="bs-footer" role="contentinfo" id="bs-footer">
      <div class="container">
          <p><span class="glyphicon glyphicon-list-alt"></span> 免责声明：本站仅分享开发思路和示例代码并且乐于交流和促进网络良性发展，是非商业工具，如有疑问请加群或邮件告知，积极配合调整。</p>
          <p><span class="glyphicon glyphicon-list-alt"></span> 反馈：payonesmile@qq.com、<a target="_blank" style="color:#f30" href="http://bbs.leipi.org/"></p>

          <p><img src="/Public/images/alipay.png" style="height:100px" alt="支付宝扫一扫"  title="有你们的支持，我们将做的更好"/>
            支持 陈毅锋：支付宝扫一扫，<a href="<?php echo U('/support');?>"  title="有你们的支持，我们将做的更好">查看记录</a></p>

          <p><span class="glyphicon glyphicon-bookmark"></span> 鸣谢：
			<a href="http://pro.wwei.cn/wxeditor.html" target="_balnk" title="微信文案">微信文案</a>、
			<a href="http://www.leipi.org" target="_balnk">雷劈网</a>、
            <a href="http://git.leipi.org" target="_balnk">GitHub</a>、
            <a href="http://www.wwei.cn/" target="_balnk" title="二维码生成器">二维码生成器</a>、
            <a href="http://ck.leipi.org/" target="_balnk" title="网页播放器">网页播放器</a>

          </p>
          <p><a href="http://www.leipi.org" title="雷劈网"><img src="/Public/images/leipi.png" alt="雷劈认证 icon" style="height:30px"></a> &copy;2014 wxEditor V1.0.0 leipi.org <a href="http://www.miitbeian.gov.cn/" target="_blank">粤ICP备13051130号</a></p>
      </div>
</div>
    

 

<script src="/Public/wxeditor/css/jquery.jgrowl.min.js"></script>
<script type="text/javascript" src="/Public/wxeditor/js/less.js"></script>
<script type="text/javascript" src="/Public/wxeditor/js/colorPicker.js"></script>
<script type="text/javascript" src="/Public/wxeditor/js/ueditor1_4_3/ueditor.config.js"></script>
<script type="text/javascript" src="/Public/wxeditor/js/ueditor1_4_3/ueditor.all.min.js"></script>
<script type="text/javascript" src="/Public/wxeditor/js/ueditor1_4_3/third-party/zeroclipboard/ZeroClipboard.min.js"></script>

<script type="text/javascript" src="/Public/wxeditor/js/wwei_editor.js"></script>


<script type="text/javascript">
	var less_parser = new less.Parser;
	ZeroClipboard.config({ swfPath: "/Public/wxeditor/js/ueditor1_4_3/third-party/zeroclipboard/ZeroClipboard.swf" } );

	var wwei_editor = UE.getEditor('wwei_editor');
	//加载本地缓存
	/*
	wwei_editor.ready(function(){
		var editor_document = wwei_editor.selection.document;
		if( window.localStorage){
			if(typeof window.localStorage._wweiContent != "undefined"){
				//wwei_editor.setContent(window.localStorage._wweiContent);
			}
			setInterval(function(){
				window.localStorage._wweiContent = wwei_editor.getContent();
			},2000);            
		}
	});*/
	
	$(function () {
		/*模板Tab */
		var dataType = 'title';
		
		function _loadtemp(dataType){
			$("#template-loading").show();
			$.ajax({
				type: "POST",
				url: "<?php echo U('/wxeditor/loadtemp');?>",
				data: {"type":dataType},
				success: function(data){
					$("#template-loading").hide();
					var tabPane = $("#temp-"+dataType);
					tabPane.html(data);
					var _tempLi = tabPane.find('.template-list li');
					_tempLi.hover(function(){
						$(this).css({"background-color":"#f5f5f5"});
					},function(){
						$(this).css({"background-color":"#fff"});
					});
					_tempLi.click(function(){
						if(dataType=='tpl')
						{
							var _tempHtml = $(this).find('.tpl-code').html();
							wwei_editor.setContent("");
							wwei_editor.execCommand('insertHtml', _tempHtml);
						}else
						{
							var _tempHtml = $(this).html();
							insertHtml(_tempHtml + "<p><br/></p>");
						}
						
					});
				}
			});
		}
		_loadtemp(dataType);//加载
		//TAB切换
		$('#templateTab a').click(function (e) {
			e.preventDefault();
			$(this).tab('show');
			
			dataType = $(this).attr("data-type");
			if(dataType)
			{
				var tabPane = $("#temp-"+dataType);
				if(tabPane.find('.template-list').length<=0)
				{
					_loadtemp(dataType);
				}
			}
		});

	
		//清空
		$('#clear-editor').click(function(){
			if(confirm('是否确认清空内容，清空后内容将无法恢复')){
				wwei_editor.setContent("");
			}        
		});
		//复制
		var client = new ZeroClipboard( $('#copy-editor-html') );
		client.on( 'ready', function(event) {
			client.on( 'copy', function(event) {
				  event.clipboardData.setData('text/html', getEditorHtml());
				  event.clipboardData.setData('text/plain', getEditorHtml());
				  showSuccessMessage("已成功复制到剪切板");
			});
		});

		//预览效果
		$("#wx-template-name").blur(function(){
			var val = $(this).val();
			if(val)
			{
				$("#wxpreview h4").html(val);
			}
		});
		$("#wx-template-dateline").blur(function(){
			var val = $(this).val();
			if(val)
			{
				$("#wxpreview em").html(val);
			}
		});
		$("#wx-template-cover").blur(function(){
			var val = $(this).val();
			if(val)
			{
				$("#wxpreview .wxpreimg").html('<img src="'+ val +'" width="290" height="209">');
			}
		});
		
		$("#wx-template-intro").blur(function(){
			var val = $(this).val();
			if(val)
			{
				$("#wxpreview .wxstr").html(val);
			}
		});

		$("#wx-template-wxid").change(function(){
			var val = $(this).find("option:selected").val(),text = $(this).find("option:selected").text(),url=$(this).find("option:selected").attr("data-url");

			if(text)
			{
				if(val==0) text = '';
				if(!url) url = 'javascript:void(0);';
				$("#wxpreview .wxhao").html('<a href="'+url+'" target="_blank">'+text+'</a>');
			}
		});
		//定制效果
		$("#is_show_title").click(function(){
			var cked = $(this).attr("checked");
			if(cked==undefined)
			{
				$("#wx_show_title").hide();
				
			}else
			{
				$("#wx_show_title").show();
			}
		});
		$("#is_show_statis").click(function(){
			var cked = $(this).attr("checked");
			if(cked==undefined)
			{
				$("#wxpreview .wxfoot").hide();
				
			}else
			{
				$("#wxpreview .wxfoot").show();
			}
		});
		
		//颜色选择
		$('.colorPicker').colorPicker({
			customBG: '#222',
			init: function(elm, colors) { // colors is a different instance (not connected to colorPicker)
			  elm.style.backgroundColor = elm.value;
			  elm.style.color = colors.rgbaMixCustom.luminance > 0.22 ? '#222' : '#ddd';
			}
		});
	});


</script>
<!-- script end -->



<div style="display: none;">                                                                   
88888888888  88                             ad88  88                ad88888ba   8888888888   
88           ""                            d8"    88               d8"     "88  88           
88                                         88     88               8P       88  88  ____     
88aaaaa      88  8b,dPPYba,   ,adPPYba,  MM88MMM  88  8b       d8  Y8,    ,d88  88a8PPPP8b,  
88"""""      88  88P'   "Y8  a8P_____88    88     88  `8b     d8'   "PPPPPP"88  PP"     `8b  
88           88  88          8PP"""""""    88     88   `8b   d8'            8P           d8  
88           88  88          "8b,   ,aa    88     88    `8b,d8'    8b,    a8P   Y8a     a8P  
88           88  88           `"Ybbd8"'    88     88      Y88'     `"Y8888P'     "Y88888P"   
                                                          d8'                                
2014-3-15 Firefly95、Ard、xinG、Xiaoyaodaya               d8'  
</div>
<div style="display:none;">
  <script type="text/javascript">
  var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
  document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F1e6fd3a46a5046661159c6bf55aad1cf' type='text/javascript'%3E%3C/script%3E"));
  </script>
</div>
</body>
</html>